<template>
    <rx-layout>
        <div slot="center">
            <a-form-model ref="form" :model="mdl" :label-col="labelCol" :wrapper-col="wrapperCol">
                <a-form-model-item :label="i18n('form.appName','应用名称')" prop="appId">
                    <span>
                        {{ allApps[mdl.appId] ? $i18(allApps[mdl.appId].appName, '应用名称') : $ti18('rxList.noAppName', '无') }}
                    </span>
                </a-form-model-item>
                <a-form-model-item :label="i18n('form.batId','批次ID')" prop="batId">
                    <a-input :disabled="readOnly" :placeholder="i18n('form.batId','请输入批次ID','input')" v-model="mdl.batId"/>
                </a-form-model-item>
                <a-form-model-item :label="i18n('form.dataId','业务数据主键')" prop="dataId">
                    <a-input :disabled="readOnly" :placeholder="i18n('form.dataId','请输入业务数据主键','input')" v-model="mdl.dataId"/>
                </a-form-model-item>
                <a-form-model-item :label="i18n('form.tableName','目标表名')" prop="tableName">
                    <a-input :disabled="readOnly" :placeholder="i18n('form.tableName','请输入目标表名','input')" v-model="mdl.tableName"/>
                </a-form-model-item>
            </a-form-model>
        </div>
    </rx-layout>
</template>
<script>
import FormTransLogDetailApi from '@/api/form/core/formTransLogDetail'
import {BaseFormModel, RxDialog} from "@lowcode/jpaas-common-lib";
import {mapState} from 'vuex';

export default {
    name: 'FormTransLogDetailEdit',
    mixins: [BaseFormModel],
    computed: {
        ...mapState({
            // 所属应用
            allApps: state => state.appSetting ? state.appSetting.allApps : {}
        }),
    },
    props:{
        readOnly:{
            type: Boolean,
            default: true
        }
    },
    components: {
        RxDialog,
    },
    data() {
        return {
            /**
             * 子表列表，以及表格属性
             */
            subTable: {},
        }

    },
    methods: {
        i18n(name,text,key){
            return this.$ti18(name,text,"formTransLogDetail",key);
        },
        get(id) {
            return FormTransLogDetailApi.get(id);
        },

        save() {
            return FormTransLogDetailApi.save(this.mdl);
        },

    }
}
</script>
<style>
.relick a {
    margin-right: 10px;
}

</style>
